package com.xrtn.service.impl;

import com.xrtn.bean.InitRecordAnswerInfo;
import com.xrtn.mapper.InitRecordAnswerMapper;
import com.xrtn.mapper.TPatientTreatmentMapper;
import com.xrtn.service.IRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class RecordServiceImpl implements IRecordService {

    @Autowired
    private InitRecordAnswerMapper initRecordAnswerMapper;

    @Autowired
    private TPatientTreatmentMapper patientTreatmentMapper;

    @Override
    public List<InitRecordAnswerInfo> selectRecordAll() {
        return initRecordAnswerMapper.selectRecordAnswerList();
    }

    @Override
    public Integer insertRecordAnswer(Map<String, Object> params) {
        return initRecordAnswerMapper.insertRecordAnswer(params);
    }

    @Override
    public Integer deleteRecordAnswerByTreatmentId(Integer treatmentId) {
        return initRecordAnswerMapper.deleteRecordAnswerByTreatmentId(treatmentId);
    }

    @Override
    public List<Integer> selectRecordAll(Integer treatmentId) {
        return initRecordAnswerMapper.selectRecordAll(treatmentId);
    }

    @Override
    public Map<String, Object> selectByTreatmentId(Integer treatmentId) {
        return patientTreatmentMapper.selectByTreatmentId(treatmentId);
    }
}
